#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>
#include<QTcpSocket>
#include<QTimer>
#include "mainwindow.h"
#include "sockethelper.h"

QT_BEGIN_NAMESPACE
namespace Ui { class Widget; }
QT_END_NAMESPACE

class Widget : public QWidget
{
    Q_OBJECT

public:
    Widget(QWidget *parent = nullptr);
    ~Widget();

private slots:
    void on_regist_PB_clicked();
    void on_registSuccess();
    void on_registFailed();
    void on_login_PB_clicked();
    void on_loginSuccess();
    void on_loginFailed();
    void on_mainQuit();
    void hide_errorLab();


private:
    Ui::Widget *ui;
    MainWindow *my_mainWindow=nullptr;
    socketHelper * socket_helper=nullptr;
    QTcpSocket *socket=nullptr;
    QString name="";
    QString pswd="";
signals:

};
#endif // WIDGET_H
